package br.perfiman.service;

import javax.ejb.Remote;

import br.perfiman.model.Asset;
import br.perfiman.model.Portfolio;

/**
 *
 * @author Wagner Costa
 * @since 08/03/2008
 * @version 1.0
 *
 */
@Remote
public interface PortfolioService extends AbstractService<Portfolio>{
	
	/**
	 * Retrieves a portifolio instance the is already using the asset
	 *
	 * @author Wagner Costa
	 * @since 08/03/2008
	 * @version 1.0
	 * @param asset
	 * @return the portfolio that is using the asset; null if nobody is using this asset
	 * @throws Exception
	 */
	Portfolio retrieveByAsset(Asset asset) throws Exception;
	
	/**
	 * Updates the user's portfolio
	 *
	 * @author Wagner Costa
	 * @since 25/03/2008
	 * @version 1.0
	 * @return the portfolio that is using the asset; null if nobody is using this asset
	 * @throws Exception
	 */
	void updatePortfolio() throws Exception;
}
